﻿#include "SmartViewController.h"

SmartViewController::SmartViewController(QObject *parent)
    : QObject(parent)
    , mSmartView(new SmartViewView)
    , mDetectController(new SVDetectController(mSmartView, this))
    , mTemplateController(new SVTemplateController(mSmartView, this))
    , mCalculateModel(new SVCalculateModel(this))
{
    mSmartView->addOptionView(mDetectController->getView());
    mSmartView->addOptionView(mTemplateController->getView());

    mDetectController->loadCalculateModel(mCalculateModel);
    mTemplateController->loadCalculateModel(mCalculateModel);
}

SmartViewController::~SmartViewController()
{
    delete mSmartView;
}

void SmartViewController::init()
{
    mSmartView->showMaximized();
}
